package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 请求参数限定
 * @author stone
 */
@Controller
@RequestMapping("param")
public class ParameterController {

    // localhost:8080/param/login?username=songge&password=niupi
    // 既要username又要password
    @RequestMapping(value = "login",params = {"username","password"})
    @ResponseBody
    public BaseRespVo login() {
        return BaseRespVo.ok("login");
    }
}
